package cc.vv.btpartyjob.partymanager.delegate

import android.widget.TextView
import cc.vv.baselibrary.view.BaseTopBarView
import cc.vv.btpartyjob.partymanager.R
import cc.vv.mvp.delegate.BaseAppDelegate

/**
 * 取消申请托管类
 * Created by Chen.qi on 2018/10/24.
 */
class ProjectCancelActivityDelegate : BaseAppDelegate() {


    override fun initWidget() {

    }

    override fun initLayoutRes(): Int {
        return R.layout.activity_cance
    }

    /**设置标题title*/
    fun setTopBarTitle(topBarTitle: String) {
        val titleBar = getView<BaseTopBarView>(R.id.btv_acaA_topBar)
        titleBar?.setTitle(topBarTitle)
    }


    /**设置标题右边按钮点击事件*/
    fun setTitleBackBtnOnClick(event: BaseTopBarView.EventInterface) {
        val titleBar = getView<BaseTopBarView>(R.id.btv_acaA_topBar)
        titleBar?.setEventInterface(event)
    }

    /**
     * 取消申请获取内容
     */
    fun getCancelContent(): String {
        val contentView = getView<TextView>(R.id.et_acaA_cancelReason)
        return contentView?.text.toString().trim()
    }

    /**
     * 取消申请获取内容
     */
    fun serReaStr(rea: String?) {
        val reaView = getView<TextView>(R.id.tv_acaA_rea)
        reaView?.text = rea
    }

}